﻿/*
  @Description:钥匙tab页js
  @Author:zb,yangpl
  @Date:2014-07-21 
*/

var GetKey = {};
//检测数据列表中是否有选中的radio
GetKey.checkRadio = function (iscenta) {
    var objModel = $("#tabKeyDataView input[type=radio]:checked");
    if (objModel.length <= 0) {
        $.OKDialogAgency('<div class="tc">请选择钥匙！</div>');
        return false;
    }
    //if (iscenta && objModel.attr("iscentaline") == "false") {
    //    $.OKDialogAgency('<div class="tc">该操作不支持配钥信息操作！</div>');
    //    return false;       
    //}
    return objModel;
};
    GetKey.init = function () {
        $(function () {
            pageWarZoneList.init();
        });
    }
//刷新页面方法
GetKey.refresh = function () {
    var urlParamters = $('#parPropertyKeyId').val() + '&keyContent=' + escape($("#keyContent").val())+'&rendom='+Math.random();
    if ($("#btnInsertKey").length > 0) {
        urlParamters += "&HaveAddKeyRight=True";
    }
    $.get("/property/property-key-obatin?" + urlParamters, function (data2) {
        $('#contentdiv').html(data2);
        GetKey.init();
    });
};


